<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/common/taglibs.jsp" %>
<%@ page import="org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter" %>
<%@ page import="org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter" %>
<%@ page import="org.springframework.security.web.WebAttributes" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<jsp:include page="/common/css_js.jsp"></jsp:include>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #1D3647;
}
-->

</style>
<script>
$(document).ready(
		function() {
			$("#loginForm")
					.validate(
							{
								rules : {
									j_username : {
										required : true
									},
									j_password : {
										required : true
									}
								},
								messages : {
									j_password : {
										required : "密码不能为空"
									},
									
									j_username : {
										required : "用户名不能为空"
									}
								}
							});
		});
</script>
<link href="${ctx }/css/skin.css" rel="stylesheet" type="text/css">
</link>
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td height="42" valign="top">
    <table width="100%" height="42" border="0" cellpadding="0" cellspacing="0" class="login_top_bg">
      <tr>
        <td width="1%" height="21">&nbsp;</td>
        <td height="42">&nbsp;</td>
        <td width="17%">&nbsp;</td>
      </tr>
    </table>
    </td>
   </tr>
  	<tr>
    <td valign="top"><table width="100%" height="532" border="0" cellpadding="0" cellspacing="0" class="login_bg">
      	<tr>
        	<td width="49%" align="right">
        	<table width="91%" height="532" border="0" cellpadding="0" cellspacing="0" class="login_bg2">
	            <tr>
	              <td  height="138" valign="top">
		              <table width="89%" height="427" border="0" cellpadding="0" cellspacing="0">
		                <tr>
		                  <td height="149">&nbsp;</td>
		                </tr>
		                <tr>
		                  <td height="80" align="right" valign="top"><img src="${ctx}/images/logo.png" width="279" height="68"></img></td>
		                </tr>
		                <tr>
		                  <td height="198" align="right" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0">
		                  </table></td>
		           </tr>
	             </table>
              </td>
             </tr>
       		 </table>
       		</td>
        <td width="1%" >&nbsp;</td>
        <td width="50%" valign="bottom"><table width="100%" height="59" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
              <td width="4%">&nbsp;</td>
              <td width="96%" height="38"><span class="login_txt_bt">common4j2ee ssh2s</span>
              	<br/>
              	<%
              		if (session.getAttribute(WebAttributes.AUTHENTICATION_EXCEPTION) != null) {
				%> 
					<div class="error" style="width: 200px;"> 用户名不存在或密码错误！</div> 
				<%
					}
				%>
              </td>
            </tr>
            <tr>
              <td>&nbsp;</td>
              <td ><table cellspacing="0" cellpadding="0" width="100%" border="0" id="table211" height="328">
                  <tr>
                    <td height="164" colspan="2" align="center">
						<form id="loginForm" action="${ctx}/j_spring_security_check" method="post" style="margin-top:1em">
							<table cellspacing="0" cellpadding="0" width="100%" border="0" height="143" id="table212">
							  <tr>
								<td width="13%" height="38" class="top_hui_text" nowrap="nowrap"><span class="login_txt">用户名：&nbsp;&nbsp; </span></td>
								<td height="38" colspan="2" class="top_hui_text" align="left">
								  <input type='text' id='j_username' value="admin" name='j_username'/></td>
							  </tr>
							  <tr>
								<td width="13%" height="35" class="top_hui_text" nowrap="nowrap"><span class="login_txt"> 密 码： &nbsp;&nbsp; </span></td>
								<td height="35" colspan="2" class="top_hui_text" align="left">
								  <input type='password' id='j_password' value="admin" name='j_password' />
								  <img src="${ctx}/images/luck.gif" width="19" height="18"></img></td>
							  </tr>
							  <tr>
								<td height="35" >&nbsp;</td>
								<td width="20%" height="35" >
									<input name="Submit" type="submit" class="button" id="Submit" value="登录"/>&nbsp;&nbsp;
									<input name="cs" type="reset" align="left" class="button" id="cs" value="重置"/></td>
								<td width="67%" class="top_hui_text"></td>
							  </tr>
							</table>
                    	</form>
                     </td>
                    </tr>
                  <tr>
                    <td width="433" height="164" align="right" valign="bottom"><img src="${ctx}/images/login-wel.gif" width="242" height="138"/></td>
                    <td width="57" align="right" valign="bottom">&nbsp;</td>
                  </tr>
              </table></td>
            </tr>
          </table>
          </td>
      </tr>
    </table>
    </td>
    </tr>
</table>
</body>
</html>

